package Day05;

import java.util.HashMap;
import java.util.Scanner;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-09-09
 * Time: 20:03
 * To BE A Better Person-2020-3-2
 */
public class TestDemo {
    public static boolean testBack(String s,char c,int index){
        int beg=0;
        int end=s.length()-1;
        while(beg < end){
            if(beg==index-1 || end==index+1){
                //hhh

            }
            if(s.charAt(beg) == s.charAt(end)){
//hhh
                beg++;
                end--;
            }
            return false;
        }
        return true;
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        char c=sc.next().charAt(0);
        int time=0;
        for (int i = 0; i < s.length(); i++) {
            Boolean ret=testBack(s,c,i);
            if(ret){
                time++;
            }
        }

    }
}
